<template>
  <button :class="`btn ${size}`" @click="handleClick">
    {{ label }}
  </button>
</template>
  
  
<script>
export default {
  name: "MyButton",
  props: {
    label: {
      type: String,
      default: "按钮",
    },
    size: {
      type: String,
      default: "default",
    },
  },
  data() {
    return {};
  },
  methods: {
    handleClick() {
      this.$emit("click");
    },
  },
};
</script>
  
  
  <style>
.btn {
  padding: 10px;
  border: none;
  cursor: pointer;
}
.btn.large {
  font-size: 20px;
}
.btn.default {
  font-size: 16px;
}
.btn.small {
  font-size: 12px;
}
</style>